//
//  BaseModel.m
//  UI13-豆瓣电影
//
//  Created by dllo on 15/12/24.
//  Copyright © 2015年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
-(instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }

    return self;
}

+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    
    id m = [[[self class]alloc]initWithDic:dic];
    return m;
    
}


+ (NSMutableArray *)modelHandWithArray:(NSArray *)arr
{
    NSMutableArray *mArr = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        id m = [[self class]modelWithDic:dic];
        
        [mArr addObject:m];
    }
    return mArr;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{


}
@end
